package com.chaoyi.model;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * tree模板
 */
public class Tree {
    private int id;
    private String text;
    private String icon;
    private Map<String,Boolean> state;
    private List<Tree> children;

    public Map<String,Boolean> getParentMap(boolean bl){
        Map<String,Boolean> parentMap = new HashMap<>();
        parentMap.put("selected",false);
        parentMap.put("open",true);
        parentMap.put("disabled",bl);
        return parentMap;
    }

    public Map<String,Boolean> getChildMap(boolean bl){
        Map<String,Boolean> parentMap = new HashMap<>();
        parentMap.put("selected",bl);
        parentMap.put("open",true);
        return parentMap;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Map<String, Boolean> getState() {
        return state;
    }

    public void setState(Map<String, Boolean> state) {
        this.state = state;
    }

    public List<Tree> getChildren() {
        return children;
    }

    public void setChildren(List<Tree> children) {
        this.children = children;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
}
